#include <stdio.h>

int findMaxConsecutiveOnes(int* nums, int numsSize) 
{
    int temp=0;
    int max=0;
   for(int i=0;i<numsSize;i++)
   {
       if(nums[i]==1)
       {
           temp++;
       }
       else
       {
        temp=0;
       }
       
       if(temp>max)
       {
           max=temp;
       }
   }
   return max;
}

int main(int argc,char* argv[])
{
    int nums[]=
   {1,1,0,0,1,1,1};
    int c=findMaxConsecutiveOnes(nums,sizeof(nums)/4);
    printf("%d\n",c);
    return 0;
}